package demo2;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-09-18
 * Time: 20:53
 */
/*
 **计算三次圆的面积及周长
 *
 */
public class Homework {
    public static void main(String[] args) {
        int i = 0;
        while (i < 3) {
            Scanner scanner = new Scanner(System.in);
            System.out.println("请输入你所要计算的圆的半径：");
            double r = scanner.nextDouble();
            double S = 3.14 * r * r;
            double C = 3.14 * 2 * r;
            System.out.println("圆的半径为：" + r);
            System.out.println("圆的面积为：" + S);
            System.out.println("圆的周长是：" + C);
            i++;
        }
    }
}
